﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/RestaurantMaster.master" AutoEventWireup="true" CodeFile="Restaurant.aspx.cs" Inherits="Restaruant_Restaurant" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Restaurant_ContentPlaceHolder" Runat="Server">
<div id="restaurant_basicinfo">
    <div>
     <table width="77%" border="2px">
        <tr>
            <td style="width:20%;text-align:right">餐厅名</td>
            <td style="width:80%;text-align:left">
                <asp:Label ID="restaurant_id_label" runat="server" Visible="false"></asp:Label>
                <asp:TextBox ID="name_textbox" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="name_required_validator" ControlToValidate="name_textbox"
                runat="server" ValidationGroup="register_group" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="width:20%;text-align:right">手机</td>
            <td style="width:80%;text-align:left">
                <asp:TextBox ID="mobile_textbox" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="mobile_regex_validator" ControlToValidate="mobile_textbox"
                runat="server" ValidationGroup="register_group" ErrorMessage="*" ValidationExpression="(\d{7,11})">
                </asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="width:20%;text-align:right">厅电话</td>
            <td style="width:80%;text-align:left">
                <asp:TextBox ID="tel_textbox" runat="server"></asp:TextBox>
                <asp:RegularExpressionValidator ID="tel_regex_validator" ControlToValidate="tel_textbox"
                runat="server" ValidationGroup="register_group" ErrorMessage="*" ValidationExpression="(\d{7,11})">
                </asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="width:20%;text-align:right">所属区域</td>
            <td style="text-align:left"><asp:DropDownList ID="restaurant_district_dropdownlist" runat="server" 
            DataValueField="Id" DataTextField="Name"></asp:DropDownList> 
                <asp:RequiredFieldValidator ID="district_required_validator" runat="server" 
            ControlToValidate="restaurant_district_dropdownlist" Display="Dynamic" ErrorMessage="*" ValidationGroup="register_group">
            </asp:RequiredFieldValidator></td>
        </tr>
        <tr>
            <td style="width:20%;text-align:right">餐厅地址</td>
            <td style="width:80%;text-align:left">
                <asp:TextBox ID="address_textbox" runat="server" Width="90%"></asp:TextBox><asp:RequiredFieldValidator ID="address_required_validator" ControlToValidate="address_textbox"
                runat="server" ValidationGroup="register_group" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align:right">日营业始</td>
            <td style="width:80%;text-align:left">
                <asp:TextBox ID="start_time_textbox" runat="server" Text="08:00"></asp:TextBox>
                <asp:RegularExpressionValidator ID="start_time_regex_validator" runat="server" ValidationGroup="register_group"
                 ControlToValidate="start_time_textbox" ErrorMessage="如08:00:00" ValidationExpression="(\d{1,2}:\d{2}(:\d{1,2}){0,1})"
                 ></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align:right">日营业止</td>
            <td style="width:80%;text-align:left">
                <asp:TextBox ID="close_time_textbox" runat="server" Text="21:30"></asp:TextBox>
                <asp:RegularExpressionValidator ID="close_time_regex_validator" runat="server" ValidationGroup="register_group"
                 ControlToValidate="close_time_textbox" ErrorMessage="如21:30" ValidationExpression="(\d{1,2}:\d{2}(:\d{1,2}){0,1})"
                 ></asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="width:20%;text-align:right">外送覆盖区域</td>
            <td style="width:80%;text-align:left">
                <asp:CheckBoxList ID="served_district_checkboxlist" runat="server" DataValueField="Id" CellSpacing="4"
                 DataTextField="Name" RepeatDirection="Horizontal" RepeatLayout="Table" RepeatColumns="3"></asp:CheckBoxList>
            </td>
        </tr>
        <tr>
            <td style="width:20%;text-align:right">外送策略</td>
            <td style="width:80%;text-align:left">
                <asp:Label ID="delivery_id_label" runat="server" Visible="false"></asp:Label>
                <asp:TextBox ID="delivery_policy_textbox" runat="server" TextMode="MultiLine" Width="100%"
                ToolTip="范例：XX区域8元起送；其他区域30元起送；工作午餐请11点之前预定，15元起送。"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="text-align:right">餐厅公告</td>
            <td style="text-align:right"><asp:TextBox ID="advertise_textbox" runat="server" 
            Width="100%" TextMode="SingleLine" Text="质量第一，顾客至上"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td style="text-align:right"><asp:Label ID="state_lable" runat="server" Text="营业状态"></asp:Label></td>
            <td style="text-align:left;width:80%"><asp:DropDownList ID="state_dropdownlist" runat="server">
              <asp:ListItem Value="True">营业中</asp:ListItem>
              <asp:ListItem Value="False">关闭</asp:ListItem>
            </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td><asp:Button ID="save_button" runat="server" OnClick="OnSubmitBtnClick" Text="提交"
               ValidationGroup="register_group" /></td>
        </tr>
        <tr>
            <td colspan="2" style="text-align:left"><asp:Label ID="notice_lable" runat="server"></asp:Label></td>
        </tr>
    </table>
    </div>
</div>
</asp:Content>

